package com.freesky.web.manager.config;

import com.freesky.web.manager.interceptor.BasePathInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
 *@author: 陈玉林
 *@date: 2018/11/27 10:28 
 *@description: 
 */
@Configuration
public class WebConfiguration extends WebMvcConfigurerAdapter {
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		// 多个拦截器组成一个拦截器链
		registry.addInterceptor(new BasePathInterceptor()).addPathPatterns("/**");
		super.addInterceptors(registry);
	}
}
